package com.woniu.service.medicalService.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniu.model.gh.utils.MapUtil;
import com.woniu.mapper.medicalService.DockerMapper;
import com.woniu.service.medicalService.IDockerService;
import com.woniu.model.medicalService.entity.Docker;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

//医生表
@Service
public class DockerServiceImpl extends ServiceImpl<DockerMapper, Docker> implements IDockerService {

    //分页 条件查询
    @Override
    public PageInfo<Docker> findPageByCondition(Map<String, Object> condition) {
        Integer pageNum = MapUtil.getInteger("pageNum", 1, condition);
        Integer pageSize = MapUtil.getInteger("pageSize", 10, condition);

        PageHelper.startPage(pageNum,pageSize);
        List<Docker> list = baseMapper.findPageByCondition(condition);
        return new PageInfo<>(list);
    }

}
